<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('/', "StaticPagesController@Home")->name('home');

Route::get('/help', "StaticPagesController@Help")->name('help');

Route::get('/about', "StaticPagesController@About")->name('about');

Route::get('/signup', "UsersController@create")->name('signup');

Route::get('/login', 'SessionsController@create')->name('login');

Route::post('/login', 'SessionsController@store')->name('login');

Route::delete('/logout', 'SessionsController@destroy')->name('logout');

Route::resource('users', 'UsersController');

Route::get('signup/confirm/{token}', 'UsersController@confirmEmail')->name('confirm_email');

Route::get('password/reset', 'PasswordController@showLinkRequestForm')->name('password.request');

Route::post('password/email', 'PasswordController@sendResetLinkEmail')->name('password.email');

Route::get('password/reset/{token}', 'PasswordController@showResetForm')->name('password.reset');

Route::post('password/reset', 'PasswordController@reset')->name('password.update');

Route::resource('statuses', 'StatusesController')->only(['store', 'destroy']);

Route::get('users/{user}/followings', 'UsersController@followings')->name('users.followings');
Route::get('users/{user}/followers', 'UsersController@followers')->name('users.followers');

Route::post('users/follower/{user}', 'FollowersController@store')->name('followers.store');
Route::delete('users/follower/{user}', 'FollowersController@destroy')->name('followers.destroy');
